package com.huazhi.wzsnw.mapper;

import com.huazhi.wzsnw.model.Smoke;
import org.apache.ibatis.annotations.Param;

import java.sql.Timestamp;
import java.util.List;

public interface SmokeMapper {
    int deleteByPrimaryKey(String tid);

    int insert(Smoke record);

    int insertSelective(Smoke record);

    Smoke selectByPrimaryKey(String tid);

    int updateByPrimaryKeySelective(Smoke record);

    int updateByPrimaryKey(Smoke record);

    List<String> selectSmokeBySearch(@Param("number") String number, @Param("state") String state, @Param("userTid") String userTid, @Param("degree") int degree, @Param("switchTest") String switchTest, @Param("companyTid") String companyTid, @Param("type") String type);

    List<Smoke> selectSmokeByTid(@Param("listTid") List<String> listTid, @Param("pageIndex") Integer pageIndex, @Param("size") Integer size);

    Integer smokeNumberByState(@Param("tid") String tid, @Param("state") String state);

    int updateStateByNumber(@Param("number") String number, @Param("state") String state, @Param("time") Timestamp time);

    List<Smoke> getSomkeByCompany(@Param("companyTid") String companyTid);

    List<Smoke> getSomke(@Param("tid") String tid);

    Integer getCountBydevEUI(@Param("devEUI") String devEUI);

    Smoke getSmokeByNumber(@Param("number") String number);

    List<Smoke> getSomkelAYindextopCard(@Param("tid") String tid);

    Integer getDeviceCount(@Param("tid") String tid, @Param("type") String type);

    Integer getDeviceStateCount(@Param("tid") String tid, @Param("type") String type, @Param("state") String state);


}